(function($, undefined) {
  
  $(document).ready(function() {
    
    $('.draggable').draggable({
      revert: true,
            helper: 'clone',
            appendTo: '#divhelper'
    });
    
    $('.droppable').droppable({
      hoverClass: 'ui-state-active',
      drop: function(e, ui) {
        $(this).find('input').val(ui.draggable.find('span').html()).addClass('solved');
        $(this).find('.numero').html(ui.draggable.html());
		$(this).find('.valor1').val(ui.draggable.html());
		$(this).find('.valor2').val(ui.draggable.html());
		$(this).find('.valor3').val(ui.draggable.html());
		$(this).find('.valor4').val(ui.draggable.html());
		$(this).find('.valor5').val(ui.draggable.html());
		$(this).find('.valor6').val(ui.draggable.html());
		$(this).find('.valor7').val(ui.draggable.html());
		$(this).find('.valor8').val(ui.draggable.html());
		$(this).find('.valor9').val(ui.draggable.html());
        $('#btnSubmit').attr('disabled', false);
      }
    });
    
  });
  
})(window.jQuery);

$(window).load(function() {
  $("#carousel").flexisel({clone: false});
});